package com.ele.pojo;

/**
 *  充当分页的结果响应时的实体类
 */
public class PageResult<T> {
    // 当前页码
    private Integer currentPage;
    // 每页显示行数
    private Integer pageSize;
    // 数据库的总记录数
    private Long total;
    // 页面需要的数据
    private T datas;

    public PageResult() {
    }

    public PageResult(Integer currentPage, Integer pageSize, Long total, T datas) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.total = total;
        this.datas = datas;
    }

    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public T getDatas() {
        return datas;
    }

    public void setDatas(T datas) {
        this.datas = datas;
    }
}
